package com.gjy.service;

import com.gjy.dao.TeacherMapper;
import com.gjy.domain.Admin;
import com.gjy.domain.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherService {
    @Autowired
    TeacherMapper teacherMapper;

    public void add(Teacher admin){
        teacherMapper.insertSelective(admin);
    }

    public List<Teacher> findAll(){
        return teacherMapper.selectByExample(null);
    }
}
